<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="./template/StakeholderTemplate.xhtml">
    <ui:define name="begin">
    <f:view beforePhase="#{mealManagerBean.initSetMealList}"/>
    </ui:define>
   <ui:define name="contentInsert">  
        <h:body>
            <h:form>  

                <p:dataTable var="setMealList" value="#{mealManagerBean.setMealList}" paginator="true" rows="15"  
                             selection="#{mealManagerBean.selectedSetMeal}" selectionMode="single"  
                             onRowSelectUpdate="display" rowSelectListener="#{mealManagerBean.onRowSelectNavigateSetMeal}"
                             dblClickSelect="true"
                             emptyMessage ="No set meal found.">  

                    <f:facet name="header">  
                        List of Set Meals  
                    </f:facet>  

                    <p:column sortBy="#{setMealList.name}" filterBy="#{setMealList.name}">  
                        <f:facet name="header">  
                            <h:outputText value="Set Meal Name" />  
                        </f:facet>  
                        <h:outputText value="#{setMealList.name}" />  
                    </p:column>  

                    <p:column sortBy="#{setMealList.originalPrice}" filterBy="#{setMealList.originalPrice}">  
                        <f:facet name="header">  
                            <h:outputText value="Original Price" />  
                        </f:facet>  
                        <h:outputText value="#{setMealList.originalPrice}" />  
                    </p:column>  

                    <p:column sortBy="#{setMealList.description}" filterBy="#{setMealList.description}">  
                        <f:facet name="header">  
                            <h:outputText value="Description" />  
                        </f:facet>  
                        <h:outputText value="#{setMealList.description}" />  
                    </p:column>  

                    <p:column sortBy="#{setMealList.visibility}" filterBy="#{setMealList.visibility}">  
                        <f:facet name="header">  
                            <h:outputText value="Visible to customers" />  
                        </f:facet>  
                        <h:outputText value="#{setMealList.visibility}" />  
                    </p:column> 
                </p:dataTable> 
            </h:form> 
        </h:body>
     </ui:define>
</ui:composition>
